package com.space.school.controller;

import com.space.school.domain.Master;
import com.space.school.service.OITService;
import com.space.school.service.impl.OITServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "O_I_T",value = "/O_I_T")
public class OrderInformationTable extends HttpServlet {

    private OITService oitService=new OITServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//        设置编码格式
        req.setCharacterEncoding("UTF-8");

        List<Master> master=oitService.findAll();
        req.setAttribute("master",master);
        req.getRequestDispatcher("order_information_table.jsp").forward(req, resp);



//
    }
}
